package me.idashu.attg.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import me.idashu.attg.domain.UpLabelEntity;
import me.idashu.attg.service.UpLabelService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/uplabel")
public class UplabelController {
	@Autowired
    private UpLabelService uplabelService;
	@RequestMapping("/getUplabelList")
	public String preUplistList(Model model,HttpServletRequest request){
		try{
			List<UpLabelEntity> listuplabel = uplabelService.getAllUplabe();
			model.addAttribute("listuplabel", listuplabel);
			model.addAttribute("uplabellist", "大分类列表");
		}catch(Exception ex){
			ex.printStackTrace();
			return "error";
		}
		return "uplabel_list";
	}
	
}
